name = "zhangsan"
print(name[0])

for s in name:
    print(s)
print("-------------------")

user = "my name is lisi"
print(user.index("name"))
print("-------------------")

#replace（旧，新）替换
new_user = user.replace("lisi","zhangsan")
print(new_urse)
print("-------------------")

#分隔 split   --->得到一个列表
names = "张三，李四，王五，赵六"
names_list = names.split(' ')
print(names_list)

#strip()头尾去空
str1="    我叫 张三    "
str2 = str1.strip()
print(str2)